Skip to content

React demo testing#226

Merged
szuperaz merged 4 commits intomainfrom
react-demo-testing
Jan 30, 2026
Merged

React demo testing#226
szuperaz merged 4 commits intomainfrom
react-demo-testing

Conversation

@szuperaz
Copy link
Contributor

@szuperaz szuperaz commented Jan 30, 2026

🎫 Ticket: https://linear.app/stream/issue/REACT-751/react-demo

📑 Docs: https://github.com/GetStream/docs-content/pull/

💡 Overview

📝 Implementation notes

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for portal-based rendering of dialogs and modals for improved positioning.
    • Enhanced attachment list with stricter swipe gesture detection to differentiate from scrolling.
  • Bug Fixes

    • Improved touch interaction reliability by validating horizontal swipes more accurately.
  • Refactor

    • Updated layout utilities for better viewport compatibility.
    • Simplified touch state management across interactive components.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Updates React demo components to support portal-based rendering via new portalContainer prop across composer components, renames interaction-related props from withoutLinks to withoutInteractions, enhances touch gesture detection in attachments, refactors pull-to-refresh state management, and adjusts layout heights to use viewport units.

Changes

Cohort / File(s) Summary
Layout Height Updates
sample-apps/react-demo/app/AppSkeleton.tsx, sample-apps/react-demo/app/layout.tsx
Updated height utility classes from min-h-full to min-h-dvh across container and drawer components for viewport-relative sizing.
Prop Renames: withoutLinks → withoutInteractions
sample-apps/react-demo/app/components/activity/Activity.tsx, sample-apps/react-demo/app/components/activity/ActivityContent.tsx, sample-apps/react-demo/app/components/common/Content.tsx
Renamed prop from withoutLinks to withoutInteractions to better reflect semantic intent, updating function signatures and internal usage across activity and content components.
Portal Container Support
sample-apps/react-demo/app/components/activity/ActivityComposer.tsx, sample-apps/react-demo/app/components/comments/CommentComposer.tsx, sample-apps/react-demo/app/components/common/composer/Composer.tsx, sample-apps/react-demo/app/components/common/composer/MentionSuggestionList.tsx
Added new optional portalContainer prop to composer components and forwarded through the hierarchy to MentionSuggestionList for portal-based rendering support.
Portal Container Wiring
sample-apps/react-demo/app/components/activity/activity-interactions/ActivityActions.tsx, sample-apps/react-demo/app/components/activity/activity-interactions/ReplyToActivity.tsx, sample-apps/react-demo/app/components/comments/comment-interactions/CommentActions.tsx, sample-apps/react-demo/app/components/common/ContentActions.tsx
Updated render callbacks and component invocations to pass dialogElement as portalContainer to composers; extended ContentActions callback signature to receive dialog reference.
Attachment Interaction Controls
sample-apps/react-demo/app/components/common/attachments/AttachmentList.tsx
Added disableButtons prop to conditionally disable navigation controls and click handlers; enhanced touch gesture detection with Y-axis tracking to differentiate horizontal swipes from vertical scrolling.
State Management Refactoring
sample-apps/react-demo/app/components/utility/PullToRefresh.tsx
Extracted resetTouchState helper function to centralize touch state cleanup; added touchcancel event listener and improved control flow in touch event handlers.

Sequence Diagram

sequenceDiagram
    actor User
    participant Dialog as Dialog<br/>(with ref)
    participant ContentActions
    participant RenderCallback as Render<br/>Callback
    participant Composer
    participant MentionSuggestionList
    participant Portal as React<br/>Portal

    User->>Dialog: Opens dialog
    Dialog->>ContentActions: dialogRef available
    ContentActions->>RenderCallback: Calls with (onClose,<br/>dialogElement)
    RenderCallback->>Composer: Renders ActivityComposer<br/>or CommentComposer<br/>with portalContainer={dialogElement}
    Composer->>Composer: Forwards portalContainer
    Composer->>MentionSuggestionList: Passes portalContainer prop
    MentionSuggestionList->>Portal: Creates portal<br/>with portalContainer<br/>instead of document.body
    Portal-->>Dialog: Renders mention<br/>suggestions inside dialog
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly Related PRs

  • example: React demo - last features #223: Modifies same React demo components including Composer/ActivityComposer portal container prop, AttachmentList touch logic, and Content/ActivityContent prop renaming.
  • example: React demo #214: Edits the same React demo files (ActivityContent, Composer, MentionSuggestionList, AttachmentList, ContentActions) that are extended and modified in this PR.

Suggested Reviewers

  • isekovanic
  • arnautov-anton

Poem

🐰 Portal doors now swing wide open, no more body scrolls,
Dialogs catch the whispered mentions in their rabbit holes,
Swipes move horizontal, scrolls go vertical and free,
Interactions renamed, cleaner now, the code doth spree! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch react-demo-testing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@szuperaz szuperaz merged commit e0d7826 into main Jan 30, 2026
2 of 7 checks passed
@szuperaz szuperaz deleted the react-demo-testing branch January 30, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant